<template>
  <div id="shoucang">
    <div class="middle">
      <div class="top">
        <ChevronLeftIcon @click="back()" class="back" />
        <div>我的收藏</div>
        <span>管理</span>
      </div>
      <div v-for="(i, key) in list" :key="key">
        <div class="box1" v-if="i.shou == 1">
          <img :src="i.img" alt="" />
          <div>
            <div>
              {{ i.name }}
            </div>
            <div>
              {{ i.zhi }}
            </div>
            <div>{{ i.price }}元/月</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
        
      <script setup lang="ts">
import axios from "../../axios";
import "./shoucang.css";
import {
  ChevronLeftIcon,
  ChevronRightIcon,
  FileCopyIcon,
} from "tdesign-icons-vue-next";
import { onMounted, ref } from "vue";
import { useRouter } from "vue-router";

let router = useRouter();
let back = () => {
  router.go(-1);
};

let list = ref([]);

let getShou = async () => {
  let { data } = await axios.get("/shou");
  list.value = data.shou;
};

onMounted(() => {
  getShou();
});
</script>
        
      <style>
</style>